package service.impl;

import bean.Student;
import dao.StudentDao;
import dao.impl.StudentDaoImpl;
import service.StudentService;

import java.util.List;

public class StudentServiceImpl implements StudentService {

    private StudentDao dao = new StudentDaoImpl();

    @Override
    public List<Student> getStudents(String stuname, String stuno, int usex,int pageIndex,int pageSize) {
        return dao.getStudnets(stuname,stuno,usex,pageIndex,pageSize);
    }

    @Override
    public int total(String stuname, String stuno, int usex) {
        return dao.total(stuname,stuno,usex);
    }

    @Override
    public int insertStu(Student student) {
        return dao.inserStu(student);
    }

    @Override
    public Student findById(int sid) {
        return dao.findById(sid);
    }

    @Override
    public int updateStu(Student student) {
        return dao.updateStu(student);
    }

    @Override
    public int delStu(String sid) {
        return dao.delStu(sid);
    }
}
